package SSP;
import java.text.NumberFormat;
import java.util.Locale;
public class ShipCalculator{
		private int Quantity;
		private int ItemWeight;
    	private float Carrier;
		private float Delivery;
      	private String htmlstring;

public int getQuantity(int qt){
	return Quantity;
}

public int getItemWeight(int iw){
	return ItemWeight;
}

public float getCarrier(float cr){
	return Carrier;
}
 
public float getDelivery (float dl){
	return Delivery;
}

public void setQuantity(int qt){
		Quantity=qt;
}

public void setItemWeight(int iw){
		ItemWeight=iw;
}
public void setCarrier (float cr){
		Carrier=cr;
}
public void setDelivery(float dl){
		Delivery=dl;
}
public void setHtmlstring(String htmlstring){
		this.htmlstring=htmlstring;
}

public String getOutput() {
	NumberFormat nf = null;       // NumberFormat is an object in the java.util package.
	float shippingcharge = 0;
	nf = NumberFormat.getCurrencyInstance(Locale.US);
	shippingcharge = Math.round(((Quantity * ItemWeight * Carrier)  + Delivery)* 100 )/100f;
	return nf.format(shippingcharge);
	}

public String getHtmlstring() {
		htmlstring=htmlstring + "<br /><h3>Enter Replacement Part Shipment Details </h3>";
		htmlstring=htmlstring + "<font size = 2>" + getOutput() + "</font><br />";
		return htmlstring;
}

}